<? $page_title=$args.title ?>
<?include "FASHION/page_header.phtml"?>
<script language="JavaScript" src="<?php echo $root; ?>/util/datepicker/WdatePicker.js"></script>
<form method="get">
    时间自：
	<input type="text" class="wdate" id="from" name="from" size="10" value="<?= fetch_a_string('from')?>"
		   onfocus="WdatePicker({onpicked:function(){$dp.$('to').focus();},maxDate:'#F{$dp.$D(\'to\')}'})" readonly />
	至 <input type="text" class="wdate" id="to" name="to" size="10" value="<?= fetch_a_string('to')?>"
		   onfocus="WdatePicker({minDate:'#F{$dp.$D(\'from\')}'})" readonly />
	订单编号：<input type="text" value="<? fetch_a_string('sno') ?>" name="sno" size="12" /> &nbsp;
	<?= Html::options2(array(
		'data'	=> $suppliers,
		'id'	=> 'supplier_id',
		'name'	=> 'supplier_id',
		'val'	=> fetch_a_int('supplier_id'),
		'text_key'	=> 'name',
		'tips'	=> '--供应商--',
	)) ?> &nbsp;
	<input type="submit" value="搜索" />
</form>

<table border="0" class="list"><tbody>
<tr class="nobg">
	<th>单号</th>
	<th>供应商</th>
	<th>金额</th>
	<th width="12%">备注</th>
	<th>用户</th>
	<th>审核状态</th>
	<th>入库状态</th>
	<th width="130">时间</th>
	<th>操作</th>
</tr>
<? if($list)foreach($list as $d){?>
<tr>
	<td><?$d.sno?></td>
	<td><?$d.supplier_name?></td>
	<td><div class="decimal fnum"><{$d.total}></div></td>
	<td class="text"><?$d.remark?></td>
	<td><?$d.user_name?></td>
	<td class="state"><?= IndentHelper::audit2txt($d.audit_flow) ?></td>
	<td class="state"><?= IndentHelper::back2txt($d.back_flow) ?></td>
	<td class="nowrap"><?=date('Y/m/d H:i', $d.addtime)?></td>
	<td valign="top">
		<a href="<?url("indent-view/id/".$d.id)?>" class="view" title="查看明细"></a>
	<{ if $args.opt }>
		<{foreach from=$args.opt item=entry}>
		<a href="<? printf($entry.url, $d.id) ?>" title="<? $entry.title ?>" class="<? $entry.class ?>"></a>
		<{/foreach}>
	<{ /if }>
	</td>
</tr>
<? } ?>
</tbody></table>

<? Html::pager($pager) ?>

<?include "FASHION/page_footer.phtml"?>
